/*
会飞的字
*/


var { Plot } = require("../Plot.js");
var { Point } = require("../Point")
/**
 * @type {HTMLCanvasElement}
 */
var canvasDom = document.querySelector("#myCanvas");
var plot = new Plot(canvasDom)
canvasDom.width = document.body.clientWidth;;
canvasDom.height = document.body.clientHeight;
var util = require("../points")


setTimeout(function () {
    /**
     * @type {{x:number,px:number,y:number,py:number,s:number,a:number}[]}
     */
    // @ts-ignore


    var tick = 0;
    var len = 1000;

    var list = util.initPointList(len);

    plot.drawList(list);

    function draw() {
        tick++;
        util.initStep(list);
        plot.drawList(list);

    }
    setInterval(draw, 10);
    globalThis.list = list;

}, 1000)



// var list = getPoints()
// var context = plot.context;
// context.font = 'normal 28pt "楷体"';
// context.fillStyle = "#000000";
// context.clearRect(0,0,canvas.width,canvas.height);  

